Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Poll for expired session #82

Merged
merged 28 commits into from
Apr 5, 2023
Merged

Poll for expired session #82

merged 28 commits into from
Apr 5, 2023

Conversation

jeffdaley
Copy link
Contributor

Adds a repeating function to check if the user's auth token has expired.

Shows a flashMessage if it is:

CleanShot 2023-03-08 at 18 52 43@2x

@jeffdaley jeffdaley requested a review from a team as a code owner March 8, 2023 23:54
@jeffdaley jeffdaley marked this pull request as draft March 9, 2023 02:26
Comment on lines -7 to +12
@onDismiss={{this.dismiss}}
@onDismiss={{close}}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We used to pass in a no-op based on the now-outdated idea that dismissOnClick is always true.

@jeffdaley jeffdaley marked this pull request as ready for review March 28, 2023 16:05
Copy link
Collaborator

@jfreda jfreda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, LGTM

Comment on lines 61 to 63
headers: {
"Hermes-Google-Access-Token": this.data.authenticated.access_token,
},
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not strictly necessary because the fetch service adds this automatically for backend requests.

@jeffdaley jeffdaley merged commit cf89070 into main Apr 5, 2023
@jeffdaley jeffdaley deleted the jeffdaley/google-pinger branch April 5, 2023 17:54
anuragprafulla pushed a commit to razorpay/hermes that referenced this pull request Jun 27, 2023
* Add fetch to tsconfig

* Fix type errors

* Show reauthentication toast when logged out

* Add test; add `basicTimeout`

* Set up basic 401 handler

* Move variable out of class

* Update Mirage's `me` handling; Update tests

* Add `isPollCall` argument to fetch

* Add `me` to Mirage; Update tests

* Add `me` to Mirage

* Revert `create('me')` changes

* Add /me endpoint to determine if the user is currently authenticated

* Revert stub endpoint

* Update endpoint

* Cleanup; documentation

* Fix merge error

* Remove redundant headers

---------

Co-authored-by: Josh Freda <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants